package com.atgm.mall.gmmallperimall.controller;

import com.atgm.common.utils.R;
import com.atgm.mall.gmmallperimall.service.PeriGoodsAttrService;
import com.atgm.mall.gmmallperimall.vo.resp.PeriGoodsAttrVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("gmmallperimall/perigoodsattr")
public class PeriGoodsAttrController {

    @Autowired
    private PeriGoodsAttrService periGoodsAttrService;

    @GetMapping("/info/{peri_goods_id}")
    public R getPeriGoodsAttrInfo(@PathVariable("peri_goods_id") Long periGoodsId) {
        List<PeriGoodsAttrVo> list = periGoodsAttrService.queryPeriGoodsAttrInfoByPeriGoodsId(periGoodsId);
        return R.ok().setData(list);
    }

}
